// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`RBAC Caching User Resources 1`] = `
Object {
  "clusterRoleBindings": Array [
    Object {
      "metadata": Object {
        "annotations": Object {
          "kubectl.kubernetes.io/last-applied-configuration": "{\\"apiVersion\\":\\"rbac.authorization.k8s.io/v1\\",\\"kind\\":\\"ClusterRoleBinding\\",\\"metadata\\":{\\"annotations\\":{},\\"name\\":\\"admin-users\\"},\\"roleRef\\":{\\"apiGroup\\":\\"rbac.authorization.k8s.io\\",\\"kind\\":\\"ClusterRole\\",\\"name\\":\\"cluster-admin\\"},\\"subjects\\":[{\\"kind\\":\\"ServiceAccount\\",\\"name\\":\\"default\\",\\"namespace\\":\\"kube-system\\"},{\\"kind\\":\\"ServiceAccount\\",\\"name\\":\\"default\\",\\"namespace\\":\\"icp-system\\"}]}
",
        },
        "creationTimestamp": "2020-02-09T06:16:23Z",
        "name": "admin-users",
        "resourceVersion": "58885",
        "uid": "b1ecadaa-4b03-11ea-92a9-00000a1027bc",
      },
      "roleRef": Object {
        "apiGroup": "rbac.authorization.k8s.io",
        "kind": "ClusterRole",
        "name": "cluster-admin",
      },
      "subjects": Array [
        Object {
          "kind": "ServiceAccount",
          "name": "default",
          "namespace": "kube-system",
        },
        Object {
          "kind": "ServiceAccount",
          "name": "default",
          "namespace": "icp-system",
        },
      ],
    },
  ],
  "clusterRoles": Array [
    Object {
      "metadata": Object {
        "annotations": Object {
          "openshift.io/description": "Allows deploymentconfigs in this namespace to rollout pods in this namespace...",
        },
        "creationTimestamp": "2020-02-09T06:16:55Z",
        "name": "system:deployers",
        "namespace": "cert-manager",
        "resourceVersion": "59172",
        "uid": "c532cf60-4b03-11ea-9c46-00000a10276e",
      },
      "roleRef": Object {
        "apiGroup": "rbac.authorization.k8s.io",
        "kind": "ClusterRole",
        "name": "system:deployer",
      },
      "subjects": Array [
        Object {
          "kind": "ServiceAccount",
          "name": "deployer",
          "namespace": "cert-manager",
        },
      ],
    },
  ],
  "namespaces": Array [
    Object {
      "metadata": Object {
        "annotations": Object {
          "openshift.io/sa.scc.mcs": "s0:c21,c0",
          "openshift.io/sa.scc.supplemental-groups": "1000420000/10000",
          "openshift.io/sa.scc.uid-range": "1000420000/10000",
        },
        "creationTimestamp": "2020-06-26T17:44:03Z",
        "name": "default",
        "resourceVersion": "8602",
        "uid": "27238466-2f13-4d61-bd10-b02567d72096",
      },
      "spec": Object {
        "finalizers": Array [
          "kubernetes",
        ],
      },
      "status": Object {
        "phase": "Active",
      },
    },
  ],
  "roleBindings": Array [
    Object {
      "metadata": Object {
        "annotations": Object {
          "rbac.authorization.kubernetes.io/autoupdate": "true",
        },
        "creationTimestamp": "2020-02-09T04:09:12Z",
        "labels": Object {
          "kubernetes.io/bootstrapping": "rbac-defaults",
        },
        "name": "admin",
        "resourceVersion": "78126",
        "uid": "ee11bac6-4af1-11ea-969d-00000a10275c",
      },
      "rules": Array [
        Object {
          "apiGroups": Array [
            "operators.coreos.com",
          ],
          "resources": Array [
            "subscriptions",
          ],
          "verbs": Array [
            "create",
            "update",
            "patch",
            "delete",
          ],
        },
      ],
    },
  ],
  "roles": Array [
    Object {
      "metadata": Object {
        "creationTimestamp": "2020-02-09T04:17:20Z",
        "name": "prometheus-k8s",
        "namespace": "default",
        "resourceVersion": "10954",
        "uid": "10c4e691-4af3-11ea-b9dd-00000a102771",
      },
      "rules": Array [
        Object {
          "apiGroups": Array [
            "",
          ],
          "resources": Array [
            "services",
            "endpoints",
            "pods",
          ],
          "verbs": Array [
            "get",
            "list",
            "watch",
          ],
        },
      ],
    },
  ],
}
`;

exports[`RBAC Caching Tests creation of rbac string for search queries 1`] = `
Object {
  "allowedNS": Array [
    "'default'",
    "'kube-public'",
  ],
  "allowedResources": Array [
    "'kube-system_authorization.openshift.io_clusterroles'",
    "'null_undefined_undefined'",
    "'null_null_namespaces'",
  ],
}
`;
