Skip to content

Commit 2c17dc5

Browse files
committed
test: update domainHostname assertion in TestBasic
Update the assertion for domainHostname in the TestBasic suite to check for the "es." prefix and ".components.cptest.test-automation.app" suffix, ensuring the output matches the expected hostname format.
1 parent 5b7aeec commit 2c17dc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/component_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
// "github.com/aws/aws-sdk-go-v2/service/docdb"
1010
"github.com/cloudposse/test-helpers/pkg/atmos"
1111
helper "github.com/cloudposse/test-helpers/pkg/atmos/component-helper"
12+
1213
// awshelper "github.com/cloudposse/test-helpers/pkg/aws"
1314
"github.com/gruntwork-io/terratest/modules/aws"
1415
"github.com/gruntwork-io/terratest/modules/random"
@@ -49,7 +50,7 @@ func (s *ComponentSuite) TestBasic() {
4950
assert.True(s.T(), strings.HasPrefix(kibanaEndpoint, "vpc-eg-default-ue2-test-e-"))
5051

5152
domainHostname := atmos.Output(s.T(), options, "domain_hostname")
52-
assert.True(s.T(), strings.HasPrefix(domainHostname, "eg-default-ue2-test-e-"))
53+
assert.True(s.T(), strings.HasPrefix(domainHostname, "es.") && strings.HasSuffix(domainHostname, ".components.cptest.test-automation.app"))
5354

5455
kibanaHostname := atmos.Output(s.T(), options, "kibana_hostname")
5556
assert.True(s.T(), strings.HasSuffix(kibanaHostname, "components.cptest.test-automation.app"))
@@ -74,7 +75,6 @@ func (s *ComponentSuite) TestBasic() {
7475
// s.VerifyEnabledFlag(component, stack, nil)
7576
// }
7677

77-
7878
func TestRunSuite(t *testing.T) {
7979
suite := new(ComponentSuite)
8080

0 commit comments

Comments
 (0)