summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-cli-json-hooks
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2021-04-23 10:36:18 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2021-04-23 12:26:46 +0200
commitdc11a4422d99cb49817c827b9f827617b5880600 (patch)
treed0aace43cbc022e674e6101bb7262b53a4924244 /test/integration/test-apt-cli-json-hooks
parentde86a4b076a37db2f70ee5fbfbb295cc71c344df (diff)
json: Add `package-list` and `statistics` install hooks
This enables hooks to output additional information.
Diffstat (limited to 'test/integration/test-apt-cli-json-hooks')
-rwxr-xr-xtest/integration/test-apt-cli-json-hooks24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/test-apt-cli-json-hooks b/test/integration/test-apt-cli-json-hooks
index 07801a547..0e6745d00 100755
--- a/test/integration/test-apt-cli-json-hooks
+++ b/test/integration/test-apt-cli-json-hooks
@@ -119,7 +119,19 @@ HOOK: empty
HOOK: BYE
The following NEW packages will be installed:
foo
+HOOK: HELLO
+HOOK: request {"jsonrpc":"2.0","method":"org.debian.apt.hooks.hello","id":0,"params":{"versions":["0.1"]}}
+HOOK: empty
+HOOK: request {"jsonrpc":"2.0","method":"org.debian.apt.hooks.install.package-list","params":{"command":"install","search-terms":["foo"],"unknown-packages":[],"packages":[{"id":2,"name":"foo","architecture":"i386","mode":"install","automatic":false,"versions":{"candidate":{"id":2,"version":"1.0","architecture":"all","pin":500,"origins":[{"archive":"unstable","codename":"sid","origin":"Oranges","label":"Lemons","site":""}]},"install":{"id":2,"version":"1.0","architecture":"all","pin":500,"origins":[{"archive":"unstable","codename":"sid","origin":"Oranges","label":"Lemons","site":""}]}}}]}}
+HOOK: empty
+HOOK: BYE
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+HOOK: HELLO
+HOOK: request {"jsonrpc":"2.0","method":"org.debian.apt.hooks.hello","id":0,"params":{"versions":["0.1"]}}
+HOOK: empty
+HOOK: request {"jsonrpc":"2.0","method":"org.debian.apt.hooks.install.statistics","params":{"command":"install","search-terms":["foo"],"unknown-packages":[],"packages":[{"id":2,"name":"foo","architecture":"i386","mode":"install","automatic":false,"versions":{"candidate":{"id":2,"version":"1.0","architecture":"all","pin":500,"origins":[{"archive":"unstable","codename":"sid","origin":"Oranges","label":"Lemons","site":""}]},"install":{"id":2,"version":"1.0","architecture":"all","pin":500,"origins":[{"archive":"unstable","codename":"sid","origin":"Oranges","label":"Lemons","site":""}]}}}]}}
+HOOK: empty
+HOOK: BYE
Inst foo (1.0 Lemons:unstable [all])
Conf foo (1.0 Lemons:unstable [all])
HOOK: HELLO
@@ -154,7 +166,19 @@ HOOK: empty
HOOK: BYE
The following packages will be upgraded:
upgrade
+HOOK: HELLO
+HOOK: request {"jsonrpc":"2.0","method":"org.debian.apt.hooks.hello","id":0,"params":{"versions":["0.1"]}}
+HOOK: empty
+HOOK: request {"jsonrpc":"2.0","method":"org.debian.apt.hooks.install.package-list","params":{"command":"dist-upgrade","search-terms":[],"unknown-packages":[],"packages":[{"id":1,"name":"upgrade","architecture":"i386","mode":"install","automatic":false,"versions":{"candidate":{"id":1,"version":"2.0","architecture":"i386","pin":500,"origins":[{"archive":"testing","codename":"testing","origin":"Oranges","label":"Lemons","site":""}]},"install":{"id":1,"version":"2.0","architecture":"i386","pin":500,"origins":[{"archive":"testing","codename":"testing","origin":"Oranges","label":"Lemons","site":""}]},"current":{"id":4,"version":"1.0","architecture":"i386","pin":100,"origins":[]}}}]}}
+HOOK: empty
+HOOK: BYE
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+HOOK: HELLO
+HOOK: request {"jsonrpc":"2.0","method":"org.debian.apt.hooks.hello","id":0,"params":{"versions":["0.1"]}}
+HOOK: empty
+HOOK: request {"jsonrpc":"2.0","method":"org.debian.apt.hooks.install.statistics","params":{"command":"dist-upgrade","search-terms":[],"unknown-packages":[],"packages":[{"id":1,"name":"upgrade","architecture":"i386","mode":"install","automatic":false,"versions":{"candidate":{"id":1,"version":"2.0","architecture":"i386","pin":500,"origins":[{"archive":"testing","codename":"testing","origin":"Oranges","label":"Lemons","site":""}]},"install":{"id":1,"version":"2.0","architecture":"i386","pin":500,"origins":[{"archive":"testing","codename":"testing","origin":"Oranges","label":"Lemons","site":""}]},"current":{"id":4,"version":"1.0","architecture":"i386","pin":100,"origins":[]}}}]}}
+HOOK: empty
+HOOK: BYE
Inst upgrade [1.0] (2.0 Lemons:testing [i386])
Conf upgrade (2.0 Lemons:testing [i386])
HOOK: HELLO