Skip to content

Commit d9aebac

Browse files
committed
test: randomize test-instance names to prevent collisions in smoke tests
1 parent 83fb215 commit d9aebac

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

core/cmd/mildstack/main_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func TestRegisterServiceRoutesRegistersS3BeforeServing(t *testing.T) {
6969
func TestRegisterNativeS3RoutesExposesAwsCompatibleSmokeSurface(t *testing.T) {
7070
t.Helper()
7171

72-
root := composition.DefaultRoot("test-instance")
72+
root := composition.DefaultRoot(fmt.Sprintf("test-instance-smoke-%d", time.Now().UnixNano()))
7373
manager := runtime.New(root.Services)
7474
router := deliveryhttp.NewRouter(deliveryhttp.DefaultConfig(), manager)
7575

@@ -692,7 +692,7 @@ func TestInstanceRegistrarServeSkipsDuplicateLoadedPort(t *testing.T) {
692692
func TestRegisterNativeSQSRoutesExposesAwsCompatibleSmokeSurface(t *testing.T) {
693693
t.Helper()
694694

695-
root := composition.DefaultRoot("test-instance")
695+
root := composition.DefaultRoot(fmt.Sprintf("test-instance-smoke-%d", time.Now().UnixNano()))
696696
manager := runtime.New(root.Services)
697697
router := deliveryhttp.NewRouter(deliveryhttp.DefaultConfig(), manager)
698698

@@ -747,7 +747,7 @@ func TestRegisterNativeSQSRoutesExposesAwsCompatibleSmokeSurface(t *testing.T) {
747747
func TestRegisterNativeSNSRoutesExposesQueryValidationSurface(t *testing.T) {
748748
t.Helper()
749749

750-
root := composition.DefaultRoot("test-instance")
750+
root := composition.DefaultRoot(fmt.Sprintf("test-instance-smoke-%d", time.Now().UnixNano()))
751751
manager := runtime.New(root.Services)
752752
router := deliveryhttp.NewRouter(deliveryhttp.DefaultConfig(), manager)
753753

0 commit comments

Comments
 (0)