Skip to content

Commit

Permalink
Add unknown config test for normalizeConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
dotNomad committed Nov 8, 2024
1 parent d7b1223 commit 1f79690
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions internal/initialize/initialize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,17 @@ func (s *InitializeSuite) TestGetPossibleConfigsWithMissingEntrypoint() {
s.Equal("nonexistent.py", configs[0].Entrypoint)
s.Nil(configs[0].Python)
}

func (s *InitializeSuite) TestNormalizeConfigHandlesUnknownConfigs() {
log := logging.New()

cfg := config.New()
cfg.Type = config.ContentTypeUnknown

ep := util.NewRelativePath("notreal.py", s.cwd.Fs())
normalizeConfig(cfg, s.cwd, util.Path{}, util.Path{}, ep, log)

// Entrypoint is set from the relative path passed to normalizeConfig
s.Equal("notreal.py", cfg.Entrypoint)
s.Contains(cfg.Files, "/notreal.py")
}

0 comments on commit 1f79690

Please sign in to comment.