@@ -65,8 +65,8 @@ func TestSnapshotExistsMatch(t *testing.T) {
6565 // Given a matching snapshot file exists
6666 tool := dummyTool {"foo" , 42 }
6767 b , _ := json .MarshalIndent (tool , "" , " " )
68- require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0700 ))
69- require .NoError (t , os .WriteFile (filepath .Join ("__toolsnaps__" , "dummy.snap" ), b , 0600 ))
68+ require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0o700 ))
69+ require .NoError (t , os .WriteFile (filepath .Join ("__toolsnaps__" , "dummy.snap" ), b , 0o600 ))
7070
7171 // When we test the snapshot
7272 err := Test ("dummy" , tool )
@@ -82,8 +82,8 @@ func TestSnapshotExistsDiff(t *testing.T) {
8282 t .Setenv ("UPDATE_TOOLSNAPS" , "false" )
8383
8484 // Given a non-matching snapshot file exists
85- require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0700 ))
86- require .NoError (t , os .WriteFile (filepath .Join ("__toolsnaps__" , "dummy.snap" ), []byte (`{"name":"foo","value":1}` ), 0600 ))
85+ require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0o700 ))
86+ require .NoError (t , os .WriteFile (filepath .Join ("__toolsnaps__" , "dummy.snap" ), []byte (`{"name":"foo","value":1}` ), 0o600 ))
8787 tool := dummyTool {"foo" , 2 }
8888
8989 // When we test the snapshot
@@ -99,8 +99,8 @@ func TestUpdateToolsnaps(t *testing.T) {
9999
100100 // Given UPDATE_TOOLSNAPS is set, regardless of whether a matching snapshot file exists
101101 t .Setenv ("UPDATE_TOOLSNAPS" , "true" )
102- require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0700 ))
103- require .NoError (t , os .WriteFile (filepath .Join ("__toolsnaps__" , "dummy.snap" ), []byte (`{"name":"foo","value":1}` ), 0600 ))
102+ require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0o700 ))
103+ require .NoError (t , os .WriteFile (filepath .Join ("__toolsnaps__" , "dummy.snap" ), []byte (`{"name":"foo","value":1}` ), 0o600 ))
104104 tool := dummyTool {"foo" , 42 }
105105
106106 // When we test the snapshot
@@ -120,8 +120,8 @@ func TestMalformedSnapshotJSON(t *testing.T) {
120120 t .Setenv ("UPDATE_TOOLSNAPS" , "false" )
121121
122122 // Given a malformed snapshot file exists
123- require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0700 ))
124- require .NoError (t , os .WriteFile (filepath .Join ("__toolsnaps__" , "dummy.snap" ), []byte (`not-json` ), 0600 ))
123+ require .NoError (t , os .MkdirAll ("__toolsnaps__" , 0o700 ))
124+ require .NoError (t , os .WriteFile (filepath .Join ("__toolsnaps__" , "dummy.snap" ), []byte (`not-json` ), 0o600 ))
125125 tool := dummyTool {"foo" , 42 }
126126
127127 // When we test the snapshot
0 commit comments