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

[BUG] GPG state module does not respect test mode #63156

Closed
lkubb opened this issue Nov 30, 2022 · 0 comments · Fixed by #63162
Closed

[BUG] GPG state module does not respect test mode #63156

lkubb opened this issue Nov 30, 2022 · 0 comments · Fixed by #63162
Labels
Bug broken, incorrect, or confusing behavior needs-triage State-Module

Comments

@lkubb
Copy link
Contributor

lkubb commented Nov 30, 2022

Description
gpg.present and gpg.absent make changes, even in test mode [although they do not report changes, even in non-test mode].

Setup
irrelevant

Steps to Reproduce the behavior

$ mkdir -p /tmp/gnupg
$ salt-call gpg.list_keys gnupghome=/tmp/gnupg
local:
$ salt-call state.single gpg.present D75899B9A724937A gnupghome=/tmp/gnupg test=true
local:
----------
          ID: D75899B9A724937A
    Function: gpg.present
      Result: True
     Comment: Adding D75899B9A724937A to GPG keychain
     Started: 18:24:06.971260
    Duration: 7763.386 ms
     Changes:

Summary for local
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time:   7.763 s
$ salt-call gpg.list_keys gnupghome=/tmp/gnupg
local:
    |_
      ----------
      created:
          2016-06-14
      fingerprint:
          28806A878AE423A28372792ED75899B9A724937A
      keyLength:
          4096
      keyid:
          D75899B9A724937A
      ownerTrust:
          Unknown
      trust:
          Unknown
      uids:
          - Nextcloud Security <security@nextcloud.com>

Expected behavior
No changes

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3005.1

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.9
     gitpython: 3.1.29
        Jinja2: 3.1.0
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: Not Installed
        Python: 3.9.14 (main, Sep 27 2022, 00:00:00)
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 23.2.0
         smmap: 5.0.0
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: rocky 9.0 Blue Onyx
        locale: utf-8
       machine: x86_64
       release: 5.14.0-70.26.1.el9_0.x86_64
        system: Linux
       version: Rocky Linux 9.0 Blue Onyx
@lkubb lkubb added Bug broken, incorrect, or confusing behavior needs-triage labels Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage State-Module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants