updated digitial ocean tests

This commit is contained in:
quobix
2024-04-18 12:05:29 -04:00
parent fcc5355a9b
commit fc6f12e6ca
2 changed files with 9 additions and 6 deletions

View File

@@ -76,6 +76,9 @@ func CreateSchemaProxyRef(ref string) *SchemaProxy {
// If there is a problem building the Schema, then this method will return nil. Use GetBuildError to gain access // If there is a problem building the Schema, then this method will return nil. Use GetBuildError to gain access
// to that building error. // to that building error.
func (sp *SchemaProxy) Schema() *Schema { func (sp *SchemaProxy) Schema() *Schema {
if sp == nil {
return nil
}
sp.lock.Lock() sp.lock.Lock()
if sp.rendered == nil { if sp.rendered == nil {

View File

@@ -186,7 +186,7 @@ func TestSpecIndex_DigitalOcean(t *testing.T) {
// get all the files! // get all the files!
files := remoteFS.GetFiles() files := remoteFS.GetFiles()
fileLen := len(files) fileLen := len(files)
assert.Equal(t, 1650, fileLen) assert.Equal(t, 1651, fileLen)
assert.Len(t, remoteFS.GetErrors(), 0) assert.Len(t, remoteFS.GetErrors(), 0)
// check circular references // check circular references
@@ -244,7 +244,7 @@ func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve(t *testing.T) {
files := fileFS.GetFiles() files := fileFS.GetFiles()
fileLen := len(files) fileLen := len(files)
assert.Equal(t, 1712, fileLen) assert.Equal(t, 1713, fileLen)
rolo.AddLocalFS(basePath, fileFS) rolo.AddLocalFS(basePath, fileFS)
@@ -266,11 +266,11 @@ func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve(t *testing.T) {
assert.Len(t, rolo.GetIgnoredCircularReferences(), 0) assert.Len(t, rolo.GetIgnoredCircularReferences(), 0)
if runtime.GOOS != "windows" { if runtime.GOOS != "windows" {
assert.Equal(t, "1.29 MB", rolo.RolodexFileSizeAsString()) assert.Equal(t, "1.3 MB", rolo.RolodexFileSizeAsString())
} else { } else {
assert.Equal(t, "1.34 MB", rolo.RolodexFileSizeAsString()) assert.Equal(t, "1.34 MB", rolo.RolodexFileSizeAsString())
} }
assert.Equal(t, 1712, rolo.RolodexTotalFiles()) assert.Equal(t, 1713, rolo.RolodexTotalFiles())
} }
func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve_RecursiveLookup(t *testing.T) { func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve_RecursiveLookup(t *testing.T) {
@@ -324,7 +324,7 @@ func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve_RecursiveLookup(t *test
files := fileFS.GetFiles() files := fileFS.GetFiles()
fileLen := len(files) fileLen := len(files)
assert.Equal(t, 1698, fileLen) assert.Equal(t, 1699, fileLen)
assert.NoError(t, rErr) assert.NoError(t, rErr)
@@ -345,7 +345,7 @@ func TestSpecIndex_DigitalOcean_FullCheckoutLocalResolve_RecursiveLookup(t *test
} else { } else {
assert.Equal(t, "1.24 MB", rolo.RolodexFileSizeAsString()) assert.Equal(t, "1.24 MB", rolo.RolodexFileSizeAsString())
} }
assert.Equal(t, 1698, rolo.RolodexTotalFiles()) assert.Equal(t, 1699, rolo.RolodexTotalFiles())
} }
func TestSpecIndex_DigitalOcean_LookupsNotAllowed(t *testing.T) { func TestSpecIndex_DigitalOcean_LookupsNotAllowed(t *testing.T) {