Normally the data needed for testing is downloaded during the "make test" step but you can also download all the data from here:
eccodes_test_data.tar.gz
Untar this into the top-level of the CMake "build" directory