All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.playtika.testcontainer.mongodb.MongodbStatusCheck Maven / Gradle / Ivy

package com.playtika.testcontainer.mongodb;

import com.playtika.testcontainer.common.checks.AbstractCommandWaitStrategy;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class MongodbStatusCheck extends AbstractCommandWaitStrategy {
    private final MongodbProperties properties;

    @Override
    public String[] getCheckCommand() {
        if (properties.getCheckCommand().length == 0) {
            return new String[]{"mongo", "admin", "--eval", "\"db['system.version'].find()\""};
        } else {
            return properties.getCheckCommand();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy