// GRANT-V22
//
// Grant:  src=['autogroup:member'] dst=['autogroup:internet'] ip=['tcp:443'] app={example.com/cap/internet-mixed}
//
// Expected: Error (HTTP 400) — cannot use app grants with autogroup:internet
{
  "test_id": "GRANT-V22",
  "error": true,
  "input": {
    "full_policy": {
      "groups": {
        "group:admins": [
          "kratail2tid@passkey"
        ],
        "group:developers": [
          "kristoffer@dalby.cc",
          "kratail2tid@passkey"
        ],
        "group:monitors": [
          "monitorpasskeykradalby@passkey"
        ],
        "group:empty": []
      },
      "tagOwners": {
        "tag:server": [
          "kratail2tid@passkey"
        ],
        "tag:prod": [
          "kratail2tid@passkey"
        ],
        "tag:client": [
          "kratail2tid@passkey"
        ],
        "tag:router": [
          "kratail2tid@passkey"
        ],
        "tag:exit": [
          "kratail2tid@passkey"
        ]
      },
      "hosts": {
        "webserver": "100.108.74.26",
        "prodbox": "100.103.8.15",
        "internal": "10.0.0.0/8"
      },
      "autoApprovers": {
        "routes": {
          "10.33.0.0/16": [
            "tag:router"
          ],
          "0.0.0.0/0": [
            "tag:exit"
          ],
          "::/0": [
            "tag:exit"
          ]
        }
      },
      "grants": [
        {
          "src": [
            "autogroup:member"
          ],
          "dst": [
            "autogroup:internet"
          ],
          "ip": [
            "tcp:443"
          ],
          "app": {
            "example.com/cap/internet-mixed": [
              {
                "proxy": "yes"
              }
            ]
          }
        }
      ]
    },
    "api_response_code": 400,
    "api_response_body": {
      "message": "cannot use app grants with autogroup:internet"
    }
  }
}
