Skip to content

Commit

Permalink
Merge pull request #75 from fastly/joeshaw/rm-viceroy-workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
joeshaw authored Aug 4, 2023
2 parents e9bd12a + 6dc2a8b commit d879056
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Integration Tests
on: [push]
env:
VICEROY_VERSION: 0.6.0
VICEROY_VERSION: 0.6.1
jobs:
integration-tests:
runs-on: ubuntu-latest
Expand Down
15 changes: 0 additions & 15 deletions integration_tests/dynamic_backend/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,13 @@ func NewBackendOptions() *fsthttp.BackendOptions {
}

func TestDynamicBackend(t *testing.T) {
var skip bool

handler := func(ctx context.Context, w fsthttp.ResponseWriter, r *fsthttp.Request) {
b, err := fsthttp.RegisterDynamicBackend(
"dynamic",
"compute-sdk-test-backend.edgecompute.app",
NewBackendOptions().UseSSL(true),
)
if err != nil {
// Remove this once Viceroy 0.6.1 is released, which fixes
// the error value.
if err.Error() == "Fastly error: Inval" {
// And we can't t.Skip() because that's not supported in TinyGo.
skip = true
return
}

t.Errorf("RegisterDynamicBackend: %v", err)
fsthttp.Error(w, err.Error(), fsthttp.StatusInternalServerError)
return
Expand Down Expand Up @@ -101,11 +91,6 @@ func TestDynamicBackend(t *testing.T) {

handler(context.Background(), w, r)

if skip {
t.Log("Skipping test due to Viceroy bug. Remove this workaround once Viceroy 0.6.1 is released.")
return
}

if got, want := w.Code, fsthttp.StatusOK; got != want {
t.Errorf("Code = %d, want %d", got, want)
}
Expand Down

0 comments on commit d879056

Please sign in to comment.