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.netdata: port to python #74078

Merged
merged 1 commit into from Nov 28, 2019

Conversation

Br1ght0ne
Copy link
Member

@Br1ght0ne Br1ght0ne commented Nov 24, 2019

Motivation for this change

#72828

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 nix-review --run "nix-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.
Notify maintainers

cc @cransom


This change is Reviewable

@flokli
Copy link
Contributor

flokli commented Nov 24, 2019

This multiline command looks kinda scary, and it seems it also doesn't work:

netdata # > > parse error: Invalid numeric literal at line 1, column 6
netdata # > > parse error: Invalid numeric literal at line 1, column 6
netdata # > > parse error: Invalid numeric literal at line 1, column 6
netdata # > > parse error: Invalid numeric literal at line 1, column 6
netdata # > > parse error: Invalid numeric literal at line 1, column 6
netdata # > > parse error: Invalid numeric literal at line 1, column 6

@Br1ght0ne
Copy link
Member Author

@flokli I hope I fixed it. Thanks for the help!

@flokli
Copy link
Contributor

flokli commented Nov 25, 2019

@GrahamcOfBorg test netdata

@Br1ght0ne
Copy link
Member Author

@flokli I think it's still a problem. Tried to debug manually with nix-build netdata.nix -A driver - this command worked just fine. Maybe it's still a quoting issue?

@Lassulus
Copy link
Member

Lassulus commented Nov 28, 2019

if I run the test and log the response of the curl with:

netdata.wait_until_succeeds(f"curl -v {url} >&2")

I get this response:

netdata # *   Trying ::1:19999...
netdata # * TCP_NODELAY set
netdata # * Connected to localhost (::1) port 19999 (#0)
netdata # > GET /api/v1/data?chart=users.pwrites HTTP/1.1
netdata # > Host: localhost:19999
netdata # > User-Agent: curl/7.67.0
netdata # > Accept: */*
netdata # >
netdata # * Mark bundle as not supporting multiuse
netdata # < HTTP/1.1 404 Not Found
netdata # < Connection: close
netdata # < Server: NetData Embedded HTTP Server v1.18.1
netdata # < Access-Control-Allow-Origin: *
netdata # < Access-Control-Allow-Credentials: true
netdata # < Content-Type: text/plain; charset=utf-8
netdata # < Date: Thu, 28 Nov 2019 21:11:02 GMT
netdata # < Cache-Control: no-cache, no-store, must-revalidate
netdata # < Pragma: no-cache
netdata # < Expires: Thu, 28 Nov 2019 21:11:03 GMT
netdata # < Content-Length: 33
netdata # <
netdata # * Closing connection 0

EDIT: actually it works after a couple of retries, just as the test tries it again a couple of times

Copy link
Member

@Lassulus Lassulus left a comment

Choose a reason for hiding this comment

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

tested with nix-review and nix-build.

@Lassulus Lassulus merged commit 085766f into NixOS:master Nov 28, 2019
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

4 participants