func TestAppGet(t *testing.T) { aws := StubAwsProvider( describeStacksCycle, ) defer aws.Close() defer func() { //TODO: remove: as we arent updating all tests we need to set current provider back to a //clean default one (I miss rspec before) provider.CurrentProvider = new(provider.TestProviderRunner) }() a, err := provider.AppGet("httpd") assert.Nil(t, err) assert.EqualValues(t, &structs.App{ Name: "httpd", Release: "RVFETUHHKKD", Status: "running", Outputs: map[string]string{ "BalancerWebHost": "httpd-web-7E5UPCM-1241527783.us-east-1.elb.amazonaws.com", "Kinesis": "convox-httpd-Kinesis-1MAP0GJ6RITJF", "LogGroup": "convox-httpd-LogGroup-L4V203L35WRM", "RegistryId": "132866487567", "RegistryRepository": "convox-httpd-hqvvfosgxt", "Settings": "convox-httpd-settings-139bidzalmbtu", "WebPort80Balancer": "80", "WebPort80BalancerName": "httpd-web-7E5UPCM", }, Parameters: map[string]string{ "WebMemory": "256", "Release": "RVFETUHHKKD", "Subnets": "subnet-13de3139,subnet-b5578fc3,subnet-21c13379", "Private": "Yes", "WebPort80ProxyProtocol": "No", "VPC": "vpc-f8006b9c", "Cluster": "convox-Cluster-1E4XJ0PQWNAYS", "Cpu": "200", "Key": "arn:aws:kms:us-east-1:132866487567:key/d9f38426-9017-4931-84f8-604ad1524920", "Repository": "", "WebPort80Balancer": "80", "SubnetsPrivate": "subnet-d4e85cfe,subnet-103d5a66,subnet-57952a0f", "Environment": "https://convox-httpd-settings-139bidzalmbtu.s3.amazonaws.com/releases/RVFETUHHKKD/env", "WebPort80Certificate": "", "WebPort80Host": "56694", "WebDesiredCount": "1", "WebPort80Secure": "No", "Version": "20160330143438-command-exec-form", }, Tags: map[string]string{ "Name": "httpd", "Type": "app", "System": "convox", "Rack": "convox", }, }, a) }
func TestAppGetUnbound(t *testing.T) { aws := StubAwsProvider( describeStacksUnbound400Cycle, describeStacksUnboundCycle, ) defer aws.Close() defer func() { //TODO: remove: as we arent updating all tests we need to set current provider back to a //clean default one (I miss rspec before) provider.CurrentProvider = new(provider.TestProviderRunner) }() a, err := provider.AppGet("httpd-old") assert.Nil(t, err) assert.EqualValues(t, &structs.App{ Name: "httpd-old", Release: "RBJFRKXUHTD", Status: "running", Outputs: map[string]string{ "Kinesis": "httpd-old-Kinesis-1E7IWRINRFHLF", "LogGroup": "httpd-old-LogGroup-P27NBY2OI3CP", "RegistryId": "132866487567", "RegistryRepository": "httpd-old-wcuacldvzi", "Settings": "httpd-old-settings-17w6y79y4ppel", "WebPort80Balancer": "80", "WebPort80BalancerName": "httpd-old", "BalancerWebHost": "httpd-old-132500142.us-east-1.elb.amazonaws.com", }, Parameters: map[string]string{ "Key": "arn:aws:kms:us-east-1:132866487567:key/d9f38426-9017-4931-84f8-604ad1524920", "Repository": "", "Environment": "https://httpd-old-settings-17w6y79y4ppel.s3.amazonaws.com/releases/RBJFRKXUHTD/env", "VPC": "vpc-f8006b9c", "Cluster": "convox-Cluster-1E4XJ0PQWNAYS", "Cpu": "200", "Version": "20160330143438-command-exec-form", "WebPort80Balancer": "80", "WebPort80Host": "37636", "Release": "RBJFRKXUHTD", "WebPort80Secure": "No", "WebPort80Certificate": "", "WebMemory": "256", "WebDesiredCount": "1", "Subnets": "subnet-13de3139,subnet-b5578fc3,subnet-21c13379", }, Tags: map[string]string{ "Type": "app", "System": "convox", "Rack": "convox", }, }, a) }