test() {
    if after_reboot; then
        # ensure the service comes up after a reboot, give it time
        # to start (i.e. avoid race between framework and ssh)
        TIMEOUT=60
        for i in $(seq $TIMEOUT); do
            services=$(systemctl | grep "${framework}_.*.service")
            if [ -n "$services" ]; then
                echo "Service $framework ready"
                break
            fi
            echo "Waiting for $framework to come up ($i)"
            sleep 1
        done
        if [ $i = $TIMEOUT ]; then
            fail "$framework provided no services"
        fi
        return
    fi

    # we test that the final line contains the framework command
    # FIXME: test progress here too
    T="$framework[[:space:]]+[0-9]{4}-[0-9]{2}-[0-9]{2}[[:space:]]+[0-9]+\.[0-9]+"
    test_regexp "$T" sudo $SNAPPY install "$framework_full"

    # ensure its there
    services=$(systemctl | grep "${framework}_.*.service")
    [ -n "$services" ] || fail "$framework provided no services"

    if can_reboot; then
        reboot
    fi
}
