Skip to content

Commit

Permalink
test: fix resolv.conf backup filename in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ReactorScram committed Mar 1, 2024
1 parent 7aa8997 commit 4691ee6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rust/connlib/shared/src/linux/etc_resolv_conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ nameserver 100.100.111.2
let temp_dir = tempfile::TempDir::with_prefix("firezone-dns-test")?;

let resolv_path = temp_dir.path().join("resolv.conf");
let backup_path = temp_dir.path().join("resolv.conf.firezone-backup");
let backup_path = temp_dir.path().join("resolv.conf.before-firezone");

write_resolv_conf(&resolv_path, &[GOOGLE_DNS.into()])?;

Expand All @@ -257,7 +257,7 @@ nameserver 100.100.111.2
let temp_dir = tempfile::TempDir::with_prefix("firezone-dns-test")?;

let resolv_path = temp_dir.path().join("resolv.conf");
let backup_path = temp_dir.path().join("resolv.conf.firezone-backup");
let backup_path = temp_dir.path().join("resolv.conf.before-firezone");

write_resolv_conf(&resolv_path, &[GOOGLE_DNS.into()])?;

Expand All @@ -275,7 +275,7 @@ nameserver 100.100.111.2
let temp_dir = tempfile::TempDir::with_prefix("firezone-dns-test")?;

let resolv_path = temp_dir.path().join("resolv.conf");
let backup_path = temp_dir.path().join("resolv.conf.firezone-backup");
let backup_path = temp_dir.path().join("resolv.conf.before-firezone");

write_resolv_conf(&resolv_path, &[GOOGLE_DNS.into()])?;

Expand Down
2 changes: 1 addition & 1 deletion scripts/tests/dns-etc-resolvconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function gateway() {
docker compose up -d gateway

echo "# check original resolv.conf"
client sh -c "cat /etc/resolv.conf.firezone-backup"
client sh -c "cat /etc/resolv.conf.before-firezone"

echo "# Make sure gateway can reach httpbin by DNS"
gateway sh -c "curl --fail $HTTPBIN/get"
Expand Down

0 comments on commit 4691ee6

Please sign in to comment.