File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
apps/workspace-engine/pkg/workspace/jobdispatch Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -424,11 +424,18 @@ func TestGithubDispatcher_GetGithubEntity(t *testing.T) {
424424
425425 dispatcher := NewGithubDispatcher (mockStore )
426426 result , exists := dispatcher .store .GithubEntities .Get (tt .searchCfg .Owner , tt .searchCfg .InstallationId )
427- if ! exists {
428- t .Errorf ("Expected to find entity, got nil" )
427+
428+ if tt .expectFound {
429+ if ! exists {
430+ t .Fatalf ("Expected to find entity, but it was not found" )
431+ }
432+ require .Equal (t , tt .searchCfg .InstallationId , result .InstallationId )
433+ require .Equal (t , tt .searchCfg .Owner , result .Slug )
434+ } else {
435+ if exists {
436+ t .Fatalf ("Expected entity not to be found, but found: %+v" , result )
437+ }
429438 }
430- require .Equal (t , tt .searchCfg .InstallationId , result .InstallationId )
431- require .Equal (t , tt .searchCfg .Owner , result .Slug )
432439 })
433440 }
434441}
You can’t perform that action at this time.
0 commit comments