github.com/go-chef/chef@v0.30.1/test_chef_server/test/integration/default/inspec/principal_spec.rb (about)

     1  # Inspec tests for the principal chef api go module
     2  #
     3  
     4  describe command('/go/src/github.com/go-chef/chef/testapi/bin/principal') do
     5    its('stderr') { should_not match(/error|no such file|cannot find|not used|undefined/) }
     6    # client and user with the same name
     7    its('stdout') do
     8      should match(/Client principal \{Principals:\[{Name:client1 Type:user.*PublicKey:.*AuthzId:.*OrgMember:false.*\{Name:client1 Type:client.*OrgMember:true.*\}/)
     9    end
    10    its('stdout') do
    11      should match(/User principal \{Principals:\[\{Name:usr1 Type:user.*PublicKey:.*AuthzId:.*OrgMember:false.*\}/)
    12    end
    13  end