problem with if statement equality

Here's my script:

/bin/script.sh

echo "hey __, don't forget the password is "kazlo""
echo "insert the name of your file in the next line, be very specific"
read var1
vartest=`find . | grep "$var1"`
echo $vartest
echo "you sure this is the right file? answer next line with (y/n)"
read var2

if test [$var = "y"]
then
scp "$vartest" username@targetserver.org:/Users/username/
echo hopefullyworks
fi

it just skips over my if statement
this is really simple i'm sure but I can't get it to work
any help appreciated

Either

if [ $var = "y" ]
then
scp "$vartest" username@targetserver.org:/Users/username/
echo hopefullyworks
fi

Or

if test $var = "y"
then
scp "$vartest" username@targetserver.org:/Users/username/
echo hopefullyworks
fi

Both test and [] are not required then if u use [] then give space after and beore [ and ]