$darkmode
#include <gtest/gtest.h>#include <iostream>#include <map>#include <string>#include <utility>#include <vector>#include <array>#include <cstdio>#include <memory>#include <stdexcept>#include <cloe/registrar.hpp>#include <fable/utility/gtest.hpp>#include "oak/curl.hpp"#include "oak/registrar.hpp"#include "oak/server.hpp"Classes | |
| class | Environment |
Functions | |
| std::string | exec (const char *cmd) |
| std::string | exec (const std::string &cmd) |
| std::string | exec (const oak::Curl &curl) |
| std::unique_ptr< oak::Server > | create_server () |
| TEST (oak_server, listen) | |
| TEST (oak_server, fail_not_listening) | |
| TEST (oak_server, get_nohandler) | |
| TEST (oak_server, get_handler) | |
| TEST (oak_server, post_handler) | |
| Tries to POST to an endpoint which echos the data back. | |
Variables | |
| std::string | address |
| std::atomic< unsigned short > | port |
| testing::Environment *const | foo_env = testing::AddGlobalTestEnvironment(new Environment) |
| std::string exec | ( | const char * | cmd | ) |
Executes a (shell) command and return the StdOut
| TEST | ( | oak_server | , |
| fail_not_listening | |||
| ) |
Test that stopping a not-listening server results in an exception.
| TEST | ( | oak_server | , |
| get_handler | |||
| ) |
Try to GET an endpoint.
| TEST | ( | oak_server | , |
| get_nohandler | |||
| ) |
Try to GET a non-existing endpoint.
| TEST | ( | oak_server | , |
| listen | |||
| ) |
Try to create a server.