Skip to content
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

nixosTests.magnetico: wait for open port and make curl actually fail #98244

Merged
merged 1 commit into from Sep 23, 2020

Conversation

mweinelt
Copy link
Member

Motivation for this change

ZHF #97479

The port is simply not opened yet because the database schema update wasn't completed yet.

Additionally the curl calls would never give a reasonable exit code without --fail.

machine # [   38.282835] magneticod[819]: 2020-09-18T18:36:17.306Z      INFO    magneticod v0.11.0 has been started.
machine # [   38.323145] magneticod[819]: 2020-09-18T18:36:17.312Z      INFO    Copyright (C) 2017-2020  Mert Bora ALPER <bora@boramalper.org>.
machine # [   38.367219] magneticod[819]: 2020-09-18T18:36:17.312Z      INFO    Dedicated to Cemile Binay, in whose hands I thrived.
machine # [   38.406781] magneticod[819]: 2020-09-18T18:36:17.313Z      INFO    Compiled on 2020-09-11T20:32:29Z
machine: must succeed: /nix/store/5kr4s9crcx6hg9yhbdgzsf9zkmi5ijpg-curl-7.72.0-bin/bin/curl -u user:password http://localhost:8081
machine # [   38.488333] magneticod[819]: 2020-09-18T18:36:17.515Z      WARN    Updating database schema from 0 to 1... (this might take a while)
machine # [   38.527766] magneticod[819]: 2020-09-18T18:36:17.524Z      WARN    Updating database schema from 1 to 2... (this might take a while)
machine # [   38.591597] magneticod[819]: 2020-09-18T18:36:17.547Z      WARN    Updating database schema from 2 to 3... (this might take a while)
machine # curl: (7) Failed to connect to localhost port 8081: Connection refused
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@mweinelt mweinelt added the 9.needs: port to stable A PR needs a backport to the stable release. label Sep 19, 2020
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Sep 19, 2020

@GrahamcOfBorg test magnetico

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Result of nixpkgs-review pr 98244 1

@jonringer jonringer merged commit 76aeb20 into NixOS:master Sep 23, 2020
@mweinelt mweinelt deleted the nixos/tests/magnetico branch September 23, 2020 13:25
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Result of nixpkgs-review pr 98244 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants