cpuinfo:
  stage: test
  image: python:3.11-slim-bullseye
  script:
    - cat /proc/cpuinfo
  when: manual


test-mongosh-1-10-0:
  stage: test

  services:
    - name: mongo:4.4
      alias: mongo
      command: ["mongod", "--logpath=/dev/null", "--bind_ip_all", "--replSet=rs0"]

  image: python:3.11-slim-bullseye

  script:
    - apt-get update -y && apt-get install -f -y --no-install-recommends wget apt-utils aptitude sudo gnupg ca-certificates
    - wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
    - echo "deb https://repo.mongodb.org/apt/debian bullseye/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
    - apt-get update -y && apt-get install -f -y --no-install-recommends mongodb-mongosh=1.10.0 && apt-mark hold mongodb-mongosh
    
    - mongosh --host mongo --eval "rs.initiate()"
    
  when: manual


test-mongosh-1-10-1:
  stage: test

  services:
    - name: mongo:4.4
      alias: mongo
      command: ["mongod", "--logpath=/dev/null", "--bind_ip_all", "--replSet=rs0"]

  image: python:3.11-slim-bullseye

  script:
    - apt-get update -y && apt-get install -f -y --no-install-recommends wget apt-utils aptitude sudo gnupg ca-certificates
    - wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
    - echo "deb https://repo.mongodb.org/apt/debian bullseye/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
    - apt-get update -y && apt-get install -f -y --no-install-recommends mongodb-mongosh=1.10.1 && apt-mark hold mongodb-mongosh
    
    - mongosh --host mongo --eval "rs.initiate()"
    
  when: manual
