-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
tstest/integration/vms: use an in-process logcatcher #2360
Conversation
This adapts the existing in-process logcatcher from tstest/integration into a public type and uses it on the side of testcontrol. This also fixes a bug in the Alpine Linux OpenRC unit that makes every value in `/etc/default/tailscaled` exported into tailscaled's environment, a-la systemd [Service].EnviromentFile. Signed-off-by: Christine Dodrill <xe@tailscale.com>
@@ -242,7 +242,7 @@ func fetchFromS3(t *testing.T, fout *os.File, d Distro) bool { | |||
|
|||
// fetchDistro fetches a distribution from the internet if it doesn't already exist locally. It | |||
// also validates the sha256 sum from a known good hash. | |||
func fetchDistro(t *testing.T, resultDistro Distro, bins *integration.Binaries) string { | |||
func (h Harness) fetchDistro(t *testing.T, resultDistro Distro) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be pointer-recievers, i.e. *Harness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They aren't mutating the values of the Harness struct and this is non-hot code. I'd prefer to take the "immutability" over speedhacking a test with a pointer receiver.
To avoid the generated nixos disk images from becoming immune from the GC, I delete the symlink to the nix store at the end of tests. `t.Cleanup` runs at the end of a test. I changed this part of the code to have a separate timer for how long it takes to run NixOS builds, but I did that by using a subtest. This means that it was creating the NixOS image, deleting its symlink and then trying to use that symlink to find the resulting disk image, making the whole thing ineffectual. This was a mistake. I am reverting this change made in #2360 to remove this layer of subtesting. Signed-off-by: Christine Dodrill <xe@tailscale.com>
To avoid the generated nixos disk images from becoming immune from the GC, I delete the symlink to the nix store at the end of tests. `t.Cleanup` runs at the end of a test. I changed this part of the code to have a separate timer for how long it takes to run NixOS builds, but I did that by using a subtest. This means that it was creating the NixOS image, deleting its symlink and then trying to use that symlink to find the resulting disk image, making the whole thing ineffectual. This was a mistake. I am reverting this change made in #2360 to remove this layer of subtesting. Signed-off-by: Christine Dodrill <xe@tailscale.com>
To avoid the generated nixos disk images from becoming immune from the GC, I delete the symlink to the nix store at the end of tests. `t.Cleanup` runs at the end of a test. I changed this part of the code to have a separate timer for how long it takes to run NixOS builds, but I did that by using a subtest. This means that it was creating the NixOS image, deleting its symlink and then trying to use that symlink to find the resulting disk image, making the whole thing ineffectual. This was a mistake. I am reverting this change made in #2360 to remove this layer of subtesting. Signed-off-by: Christine Dodrill <xe@tailscale.com>
To avoid the generated nixos disk images from becoming immune from the GC, I delete the symlink to the nix store at the end of tests. `t.Cleanup` runs at the end of a test. I changed this part of the code to have a separate timer for how long it takes to run NixOS builds, but I did that by using a subtest. This means that it was creating the NixOS image, deleting its symlink and then trying to use that symlink to find the resulting disk image, making the whole thing ineffectual. This was a mistake. I am reverting this change made in #2360 to remove this layer of subtesting. Signed-off-by: Christine Dodrill <xe@tailscale.com>
This adapts the existing in-process logcatcher from tstest/integration
into a public type and uses it on the side of testcontrol. This also
fixes a bug in the Alpine Linux OpenRC unit that makes every value in
/etc/default/tailscaled
exported into tailscaled's environment, a-lasystemd [Service].EnviromentFile.
Signed-off-by: Christine Dodrill xe@tailscale.com