mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nitter: update tests to use guestAccounts
This commit is contained in:
parent
23a56af4b4
commit
d380604c44
@ -1,13 +1,28 @@
|
|||||||
import ./make-test-python.nix ({ pkgs, ... }:
|
import ./make-test-python.nix ({ pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# In a real deployment this should naturally not common from the nix store
|
||||||
|
# and be seeded via agenix or as a non-nix managed file.
|
||||||
|
#
|
||||||
|
# These credentials are from the nitter wiki and are expired. We must provide
|
||||||
|
# credentials in the correct format, otherwise nitter fails to start. They
|
||||||
|
# must not be valid, as unauthorized errors are handled gracefully.
|
||||||
|
guestAccountFile = pkgs.writeText "guest_accounts.jsonl" ''
|
||||||
|
{"oauth_token":"1719213587296620928-BsXY2RIJEw7fjxoNwbBemgjJhueK0m","oauth_token_secret":"N0WB0xhL4ng6WTN44aZO82SUJjz7ssI3hHez2CUhTiYqy"}
|
||||||
|
'';
|
||||||
|
in
|
||||||
{
|
{
|
||||||
name = "nitter";
|
name = "nitter";
|
||||||
meta.maintainers = with pkgs.lib.maintainers; [ erdnaxe ];
|
meta.maintainers = with pkgs.lib.maintainers; [ erdnaxe ];
|
||||||
|
|
||||||
nodes.machine = {
|
nodes.machine = {
|
||||||
services.nitter.enable = true;
|
services.nitter = {
|
||||||
# Test CAP_NET_BIND_SERVICE
|
enable = true;
|
||||||
services.nitter.server.port = 80;
|
# Test CAP_NET_BIND_SERVICE
|
||||||
|
server.port = 80;
|
||||||
|
# Provide dummy guest accounts
|
||||||
|
guestAccounts = guestAccountFile;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user