@@ -149,6 +149,20 @@ func testCustomCodeConflictResolutionAcceptOurs(t *testing.T, speakeasyBinary st
149149 customCodeOutput , customCodeErr := customCodeCmd .CombinedOutput ()
150150 require .NoError (t , customCodeErr , "customcode command should succeed after conflict resolution: %s" , string (customCodeOutput ))
151151
152+ // Verify patch file was removed or is empty
153+ patchFile := filepath .Join (temp , ".speakeasy" , "patches" , "custom-code.diff" )
154+ patchContent , err := os .ReadFile (patchFile )
155+ if err == nil {
156+ require .Empty (t , patchContent , "Patch file should be empty after accepting ours" )
157+ }
158+ // If file doesn't exist, that's also fine
159+
160+ // Verify gen.lock doesn't contain customCodeCommitHash
161+ genLockPath := filepath .Join (temp , ".speakeasy" , "gen.lock" )
162+ genLockContent , err := os .ReadFile (genLockPath )
163+ require .NoError (t , err , "Failed to read gen.lock" )
164+ require .NotContains (t , string (genLockContent ), "customCodeCommitHash" , "gen.lock should not contain customCodeCommitHash after accepting ours" )
165+
152166 // Run speakeasy run again to verify patches are applied correctly
153167 runRegeneration (t , speakeasyBinary , temp , true )
154168
0 commit comments