sevensolutions commented on PR #9563:
URL: https://github.com/apache/apisix/pull/9563#issuecomment-1734362911

   I think i'am almost there. What i've done:
   1. Added a new consul service to *ci/pod/docker-compose.first.yml* which 
enables ACL
   ```
   consul_3:
       image: consul:1.15.4
       restart: unless-stopped
       ports:
         - "8502:8500"
       command: [ "consul", "agent", "-server", "-bootstrap-expect=1", 
"-client", "0.0.0.0", "-log-level", "info", "-data-dir=/consul/data", 
"-enable-script-checks", "-ui", "-hcl", "acl = {\nenabled = 
true\ndefault_policy = \"deny\"\nenable_token_persistence = true\n}" ]
       networks:
         consul_net:
   ```
   2. Run `make ci-env-up project_compose_ci=ci/pod/docker-compose.first.yml`
   3. Added a new test in *t/discovery/consul.t* to bootstrap the ACL system
   ```
   === TEST 14: bootstrap acl
   --- config
   location /v1/acl {
       proxy_pass http://127.0.0.1:8502;
   }
   --- request eval
   [
       "PUT /v1/acl/bootstrap\n" . "{\"BootstrapSecret\": 
\"2b778dd9-f5f1-6f29-b4b4-9a5fa948757a\"}"
   ]
   --- error_code eval
   [200]
   ```
   3. Then i've just copied one of the other tests.
   4. Executed tests with `TEST_NGINX_BINARY=/usr/bin/openresty prove 
-It/test-nginx/lib -I./ -r t/discovery/consul.t`
   
   Is this the correct way to go?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to