Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .outpost.yaml.dev
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ idgen:
type: "nanoid"
event_prefix: "evt"
destination_prefix: "des"
delivery_prefix: "dlv"
"
attempt_prefix: "atm"

# Concurrency
publish_max_concurrency: 1
Expand Down
146 changes: 73 additions & 73 deletions cmd/e2e/log_test.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions cmd/e2e/suites_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func waitForHealthy(t *testing.T, port int, timeout time.Duration) {
t.Fatalf("timed out waiting for health check at %s", healthURL)
}

// waitForDeliveries polls until at least minCount deliveries exist for the given path.
func (s *e2eSuite) waitForDeliveries(t *testing.T, path string, minCount int, timeout time.Duration) {
// waitForAttempts polls until at least minCount attempts exist for the given path.
func (s *e2eSuite) waitForAttempts(t *testing.T, path string, minCount int, timeout time.Duration) {
t.Helper()
deadline := time.Now().Add(timeout)
var lastCount int
Expand Down Expand Up @@ -72,9 +72,9 @@ func (s *e2eSuite) waitForDeliveries(t *testing.T, path string, minCount int, ti
time.Sleep(100 * time.Millisecond)
}
if lastErr != nil {
t.Fatalf("timed out waiting for %d deliveries at %s: last error: %v", minCount, path, lastErr)
t.Fatalf("timed out waiting for %d attempts at %s: last error: %v", minCount, path, lastErr)
}
t.Fatalf("timed out waiting for %d deliveries at %s: got %d (status %d)", minCount, path, lastCount, lastStatus)
t.Fatalf("timed out waiting for %d attempts at %s: got %d (status %d)", minCount, path, lastCount, lastStatus)
}

// waitForDestinationDisabled polls until the destination has disabled_at set (non-null).
Expand Down
4 changes: 0 additions & 4 deletions cmd/publish/publish_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ const (
func publishHTTP(body map[string]interface{}) error {
log.Printf("[x] Publishing HTTP")

// make HTTP POST request to the URL specified in the body

jsonData, err := json.Marshal(body)
if err != nil {
return fmt.Errorf("failed to marshal body to JSON: %w", err)
}

// Make HTTP POST request
req, err := http.NewRequest("POST", ServerURL, bytes.NewBuffer(jsonData))
if err != nil {
return fmt.Errorf("failed to create HTTP request: %w", err)
Expand All @@ -37,7 +34,6 @@ func publishHTTP(body map[string]interface{}) error {
}
defer resp.Body.Close()

// Check for non-200 status code
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("received non-200 response: %d", resp.StatusCode)
}
Expand Down
Loading