Skip to content

Commit

Permalink
skip test if file not found
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Aug 5, 2024
1 parent 3426da5 commit db01bbe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xbarapp.com/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ func TestPluginMetadata(t *testing.T) {
is := is.New(t)

pluginMetadataPath := filepath.Join(docsFolder, "/plugins/Dev/Tutorial/cycle_text_and_detail.sh.json")

// if the file doesn't exist - skip the test
if _, err := os.Stat(pluginMetadataPath); os.IsNotExist(err) {
t.Skipf("file %s doesn't exist", pluginMetadataPath)
return
}

p := loadPluginMetadata(is, pluginMetadataPath)
is.True(p.Version != "") // version doesn't match
is.True(p.LastUpdated != "")
Expand Down

0 comments on commit db01bbe

Please sign in to comment.