Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
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
30 changes: 18 additions & 12 deletions .github/workflows/cache-config-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,47 @@ on:
workflow_dispatch:
push:
paths:
- cache-config/**.go
- cache-config/testing/**
- .github/actions/build-ats-test-rpm/**
- .github/actions/cache-config-integration-tests/**
- .github/actions/repo-info/**
- .github/workflows/cache-config-tests.yml
- go.mod
- go.sum
- GO_VERSION
- lib/atscfg-go/**.go
- lib/go-atscfg/**.go
- 'traffic_ops/app/db/**'
- '!traffic_ops/app/db/**.md'
- traffic_ops/*client/**.go
- 'traffic_ops/install/**'
- traffic_ops/toclientlib/**.go
- lib/atscfg-go/**.go
- traffic_ops/traffic_ops_golang/**.go
- cache-config/**.go
- cache-config/testing/**
- vendor/**.go
- vendor/modules.txt
- .github/actions/build-ats-test-rpm/**
- .github/actions/repo-info/**
- .github/actions/cache-config-integration-tests/**
create:
pull_request:
paths:
- cache-config/**.go
- cache-config/testing/**
- .github/actions/build-ats-test-rpm/**
- .github/actions/cache-config-integration-tests/**
- .github/actions/repo-info/**
- .github/workflows/cache-config-tests.yml
- go.mod
- go.sum
- GO_VERSION
- lib/atscfg-go/**.go
- lib/go-atscfg/**.go
- 'traffic_ops/app/db/**'
- '!traffic_ops/app/db/**.md'
- traffic_ops/*client/**.go
- 'traffic_ops/install/**'
- traffic_ops/toclientlib/**.go
- lib/atscfg-go/**.go
- traffic_ops/traffic_ops_golang/**.go
- cache-config/**.go
- cache-config/testing/**
- vendor/**.go
- vendor/modules.txt
- .github/actions/build-ats-test-rpm/**
- .github/actions/repo-info/**
- .github/actions/cache-config-integration-tests/**
types: [opened, reopened, ready_for_review, synchronize]

jobs:
Expand Down
7 changes: 3 additions & 4 deletions traffic_ops/app/db/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ func seed() {
}
cmd := exec.Command("psql", "-h", hostIP, "-p", hostPort, "-d", dbName, "-U", dbUser, "-e", "-v", "ON_ERROR_STOP=1")
cmd.Stdin = bytes.NewBuffer(seedsBytes)
cmd.Env = append(os.Environ(), "PGPASSWORD="+dbPassword)
out, err := cmd.CombinedOutput()
fmt.Println(string(out))
if err != nil {
Expand All @@ -485,6 +486,7 @@ func loadSchema() {
}
cmd := exec.Command("psql", "-h", hostIP, "-p", hostPort, "-d", dbName, "-U", dbUser, "-e", "-v", "ON_ERROR_STOP=1")
cmd.Stdin = bytes.NewBuffer(schemaBytes)
cmd.Env = append(os.Environ(), "PGPASSWORD="+dbPassword)
out, err := cmd.CombinedOutput()
fmt.Println(string(out))
if err != nil {
Expand All @@ -503,6 +505,7 @@ func patch() {
}
cmd := exec.Command("psql", "-h", hostIP, "-p", hostPort, "-d", dbName, "-U", dbUser, "-e", "-v", "ON_ERROR_STOP=1")
cmd.Stdin = bytes.NewBuffer(patchesBytes)
cmd.Env = append(os.Environ(), "PGPASSWORD="+dbPassword)
out, err := cmd.CombinedOutput()
fmt.Printf(string(out))
if err != nil {
Expand Down Expand Up @@ -658,10 +661,6 @@ func main() {
if err := parseDBConfig(); err != nil {
die(err.Error())
}
if err := os.Setenv("PGPASSWORD", dbPassword); err != nil {
die("Setting PGPASSWORD: " + err.Error())
}

commands := make(map[string]func())

commands[cmdCreateDB] = createDB
Expand Down