smocker icon indicating copy to clipboard operation
smocker copied to clipboard

When using persistence, session name is reloaded, but mocks and history are not.

Open mkrum001 opened this issue 2 years ago • 3 comments

Hello,

I'm using Smocker with Docker-compose:

version: '3.8'

services:
  smocker:
    image: thiht/smocker:0.18.5
    container_name: smocker
    ports:
      - 8080:8080
      - 8081:8081
    environment:
      - SMOCKER_PERSISTENCE_DIRECTORY=/mnt
    volumes:
      - type: bind
        source: ../data
        target: /mnt

After the container is up and running, I can see on the host file system "sessions.yml" file and a folder named with the session id. If I add a mock using "Add mocks endpoint", this mock appear in mocks.yml inside session folder. So far so good. If the container restarts, this mock is no longer visible from the UI. The only reloaded information is the session name. No history, no mocks.

mkrum001 avatar Nov 15 '23 14:11 mkrum001

rollback 0.17.1

willy-kimbyungsoo avatar Nov 28 '23 07:11 willy-kimbyungsoo

🤔 I will check that. I've made those changes because I have a strange behaviour on MacOS. I'll start from 0.17.1 and add some non-regression on persistence to ensure that sessions are load correctly at start and that the synchronisation is correctly made.

gwleclerc avatar Nov 28 '23 08:11 gwleclerc

Hello, same kind of behavior here (Debian 10/docker) : persistence no more working after image upgrade. I tried with 0.18.3, 0.18.4 and 0.18.5. No luck, should rollback to 0.18.2 to load existing history & mocks.

Here is my compose file :

version: "3.3"
services:
  smocker:
    container_name: smocker
    image: "thiht/smocker:0.18.2"
    volumes:
    - /home/testing/smocker:/home
    environment:
    - SMOCKER_PERSISTENCE_DIRECTORY=/home
    - SMOCKER_LOG_LEVEL=debug
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: 10m
        max-file: "3"
    networks:
    - proxy-net

networks:
  proxy-net:
    external: true

Rem-V avatar Dec 05 '23 09:12 Rem-V

gwleclerc hey! Could you pls tell when this fix will be relased?

shakun-roman avatar Jun 12 '24 22:06 shakun-roman