// We expect that the advisor will find the cloud resources associated with a captured action
// in this case we expect the resource to be "test-bucket/sample-object"
We expect that the advisor will find the cloud resources associated with a captured action
in this case we expect the resource to be "test-bucket/sample-object"
// We expect that the advisor will find the cloud resources associated with a captured action // in this case we expect the resource to be " test - bucket / sample - object "
func TestJSONRecommendationsSetsResources(t *testing.T) {
	advisor := buildExampleAdvisor()
	e := buildSampleEvent()
	a, _ := advisor(e)
	resources := a.Details().Resources
	if len(resources) != 1 {
		t.Fatal("expected 1 resource to be found")
	}
	expected := "test-bucket/sample-object"
	name := resources[0].Name
	if name != expected {
		t.Fatalf("parsed resource name did not match expected, name=%s expected=%s", name, expected)
	}
}
func TestJSONRecommendationsSetsResources ( t * testing . T ) { advisor := buildExampleAdvisor ( ) e := buildSampleEvent ( ) a , _ := advisor ( e ) resources := a . Details ( ) . Resources if len ( resources ) != 1 { t . Fatal ( " " ) } expected := " " name := resources [ 0 ] . Name if name != expected { t . Fatalf ( " " , name , expected ) } }
We expect that the advisor will find the cloud resources associated with a captured action
in this case we expect the resource to be "test-bucket/sample-object"
We expect that the advisor will find the cloud resources associated with a captured action in this case we expect the resource to be " test - bucket / sample - object "