Sha256: cb786d1eb4ef19f6af612f15cdf3da4bd220308b7da67e2643dc0524531d4020

Contents?: true

Size: 1005 Bytes

Versions: 1

Compression:

Stored size: 1005 Bytes

Contents

package org.embulk.input.bigquery_export_gcs;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TestGoogleCloudAccessData  extends UnitTestInitializer
{
	private static final Logger log = LoggerFactory.getLogger(TestGoogleCloudAccessData.class);

    @Test
    public void envTest(){
    	log.info("{}",System.getenv("GCP_PROJECT"));
    }

    @Test
    public void testGcsInputStreamOpen() throws FileNotFoundException, IOException
    {
    	BigqueryExportGcsFileInputPlugin.PluginTask task = config.loadConfig(BigqueryExportGcsFileInputPlugin.PluginTask.class );
    	
        plugin.executeBigqueryApi(task);
        
    	InputStream ins = BigqueryExportUtils.openInputStream(task, task.getFiles().get(0));
    	
    	log.info("file size : {}",org.apache.commons.compress.utils.IOUtils.toByteArray(ins).length);
    }
    

}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
embulk-input-bigquery_extract_files-0.0.9 src/test/java/org/embulk/input/bigquery_export_gcs/TestGoogleCloudAccessData.java