Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cdn): random position #5842

Merged
merged 2 commits into from
Jun 11, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions engine/cdn/cdn_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,17 @@ func TestSyncLog(t *testing.T) {
cdnUnits.Start(ctx, sdk.NewGoRoutines(ctx))
s.Units = cdnUnits

cdsStorage, ok := s.Units.Storages[0].(*cds.CDS)
require.True(t, ok)
var cdsStorage *cds.CDS
for _, sto := range s.Units.Storages {
cdsStorage = sto.(*cds.CDS)
if cdsStorage != nil {
break
}
}

if cdsStorage == nil {
t.Fail()
}

// Mock Http route
gock.InterceptClient(cdsStorage.GetClient().HTTPClient())
Expand Down