@@ -43,6 +43,9 @@ func TestSnapshotDoesNotExistNotInCI(t *testing.T) {
4343
4444func TestSnapshotDoesNotExistInCI (t * testing.T ) {
4545 withIsolatedWorkingDir (t )
46+ // Ensure that UPDATE_TOOLSNAPS is not set for this test, which it might be if someone is running
47+ // UPDATE_TOOLSNAPS=true go test ./...
48+ t .Setenv ("UPDATE_TOOLSNAPS" , "false" )
4649
4750 // Given we are running in CI
4851 t .Setenv ("GITHUB_ACTIONS" , "true" )
@@ -74,6 +77,9 @@ func TestSnapshotExistsMatch(t *testing.T) {
7477
7578func TestSnapshotExistsDiff (t * testing.T ) {
7679 withIsolatedWorkingDir (t )
80+ // Ensure that UPDATE_TOOLSNAPS is not set for this test, which it might be if someone is running
81+ // UPDATE_TOOLSNAPS=true go test ./...
82+ t .Setenv ("UPDATE_TOOLSNAPS" , "false" )
7783
7884 // Given a non-matching snapshot file exists
7985 require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0700 ))
@@ -109,6 +115,9 @@ func TestUpdateToolsnaps(t *testing.T) {
109115
110116func TestMalformedSnapshotJSON (t * testing.T ) {
111117 withIsolatedWorkingDir (t )
118+ // Ensure that UPDATE_TOOLSNAPS is not set for this test, which it might be if someone is running
119+ // UPDATE_TOOLSNAPS=true go test ./...
120+ t .Setenv ("UPDATE_TOOLSNAPS" , "false" )
112121
113122 // Given a malformed snapshot file exists
114123 require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0700 ))
0 commit comments