Skip to content

Commit

Permalink
update digital ocean tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emilien-puget authored and daveshanley committed Apr 7, 2024
1 parent c0385f2 commit 7439d52
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions index/spec_index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func TestSpecIndex_DigitalOcean(t *testing.T) {
// get all the files!
files := remoteFS.GetFiles()
fileLen := len(files)
assert.Equal(t, 1646, fileLen)
assert.Equal(t, 1650, fileLen)
assert.Len(t, remoteFS.GetErrors(), 0)

// check circular references
Expand Down Expand Up @@ -244,7 +244,7 @@ func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve(t *testing.T) {
files := fileFS.GetFiles()
fileLen := len(files)

assert.Equal(t, 1699, fileLen)
assert.Equal(t, 1712, fileLen)

rolo.AddLocalFS(basePath, fileFS)

Expand All @@ -256,8 +256,8 @@ func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve(t *testing.T) {

assert.NotNil(t, index)

assert.Len(t, index.GetMappedReferencesSequenced(), 301)
assert.Len(t, index.GetMappedReferences(), 301)
assert.Len(t, index.GetMappedReferencesSequenced(), 303)
assert.Len(t, index.GetMappedReferences(), 303)
assert.Len(t, fileFS.GetErrors(), 0)

// check circular references
Expand All @@ -266,11 +266,11 @@ func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve(t *testing.T) {
assert.Len(t, rolo.GetIgnoredCircularReferences(), 0)

if runtime.GOOS != "windows" {
assert.Equal(t, "1.27 MB", rolo.RolodexFileSizeAsString())
assert.Equal(t, "1.29 MB", rolo.RolodexFileSizeAsString())
} else {
assert.Equal(t, "1.32 MB", rolo.RolodexFileSizeAsString())
assert.Equal(t, "1.34 MB", rolo.RolodexFileSizeAsString())
}
assert.Equal(t, 1699, rolo.RolodexTotalFiles())
assert.Equal(t, 1712, rolo.RolodexTotalFiles())
}

func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve_RecursiveLookup(t *testing.T) {
Expand Down Expand Up @@ -324,28 +324,28 @@ func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve_RecursiveLookup(t *test
files := fileFS.GetFiles()
fileLen := len(files)

assert.Equal(t, 1685, fileLen)
assert.Equal(t, 1698, fileLen)

assert.NoError(t, rErr)

index := rolo.GetRootIndex()

assert.NotNil(t, index)

assert.Len(t, index.GetMappedReferencesSequenced(), 301)
assert.Len(t, index.GetMappedReferences(), 301)
assert.Len(t, index.GetMappedReferencesSequenced(), 303)
assert.Len(t, index.GetMappedReferences(), 303)
assert.Len(t, fileFS.GetErrors(), 0)

// check circular references
rolo.CheckForCircularReferences()
assert.Len(t, rolo.GetCaughtErrors(), 0)
assert.Len(t, rolo.GetIgnoredCircularReferences(), 0)
if runtime.GOOS == "windows" {
assert.Equal(t, "1.26 MB", rolo.RolodexFileSizeAsString())
assert.Equal(t, "1.28 MB", rolo.RolodexFileSizeAsString())
} else {
assert.Equal(t, "1.22 MB", rolo.RolodexFileSizeAsString())
assert.Equal(t, "1.24 MB", rolo.RolodexFileSizeAsString())
}
assert.Equal(t, 1685, rolo.RolodexTotalFiles())
assert.Equal(t, 1698, rolo.RolodexTotalFiles())
}

func TestSpecIndex_DigitalOcean_LookupsNotAllowed(t *testing.T) {
Expand Down

0 comments on commit 7439d52

Please sign in to comment.